home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / share / nextfile.awk < prev    next >
Encoding:
Text File  |  1998-12-04  |  388 b   |  16 lines

  1. # nextfile --- skip remaining records in current file
  2. # correctly handle successive occurrences of the same file
  3. # Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain
  4. # May, 1993
  5.  
  6. # this should be read in before the "main" awk program
  7.  
  8. function nextfile()   { _abandon_ = FILENAME; next }
  9.  
  10. _abandon_ == FILENAME {
  11.       if (FNR == 1)
  12.           _abandon_ = ""
  13.       else
  14.           next
  15. }
  16.